package com.xinchengxd.order.service;

import com.xinchengxd.commons.ResponseResult;
import com.xinchengxd.commons.entity.user.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/*
 * 1.pom引入feign依赖
 * 2.启动类上启动FeignClient @EnableFeignClients
 * 3.接口上使用注解@FeignClient("调用对方中yml中的服务名")
 * */
@FeignClient("service-user")
public interface UserService {

    @GetMapping("user/point")
    ResponseResult<String> updatePoint(@RequestParam int id,@RequestParam int change);

    @GetMapping("user/lookbyid")
    ResponseResult<User> lookbyid(@RequestParam int userId);

}
